package com.kuzlak.cms.module.sys.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;

/**
 * 
 * @TableName sys_login_log
 */
@TableName(value ="sys_login_log")
@Data
public class SysLoginLog implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 
     */
    private String ip;

    /**
     * 
     */
    private String terminal;

    /**
     * 
     */
    private String version;

    /**
     * 
     */
    private Long userId;

    /**
     * 
     */
    private String userName;



    /**
     *
     */
    @TableField(fill = FieldFill.INSERT)
    private Long createDate;

    /**
     *
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateDate;

    /**
     * 
     */
    private Integer state;

    /**
     * 
     */
    private String token;

    /**
     * 
     */
    private String browser;

    /**
     * 
     */
    private String systemName;

    /**
     * 
     */
    private String address;

    /**
     * 
     */
    private Long organId;

    /**
     * 
     */
    private Long deptId;

    /**
     * 
     */
    private Integer organType;

    /**
     * 
     */
    private Integer addressCode;

    /**
     * 
     */
    private String perIds;

    /**
     * 
     */
    private Integer managementArea;

    /**
     * 
     */
    private String perKeys;

    /**
     * 口岸
     */
    private Long port;

    /**
     * 
     */
    private Long customerId;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysLoginLog other = (SysLoginLog) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getIp() == null ? other.getIp() == null : this.getIp().equals(other.getIp()))
            && (this.getTerminal() == null ? other.getTerminal() == null : this.getTerminal().equals(other.getTerminal()))
            && (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getCreateDate() == null ? other.getCreateDate() == null : this.getCreateDate().equals(other.getCreateDate()))
            && (this.getUpdateDate() == null ? other.getUpdateDate() == null : this.getUpdateDate().equals(other.getUpdateDate()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getToken() == null ? other.getToken() == null : this.getToken().equals(other.getToken()))
            && (this.getBrowser() == null ? other.getBrowser() == null : this.getBrowser().equals(other.getBrowser()))
            && (this.getSystemName() == null ? other.getSystemName() == null : this.getSystemName().equals(other.getSystemName()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getOrganId() == null ? other.getOrganId() == null : this.getOrganId().equals(other.getOrganId()))
            && (this.getDeptId() == null ? other.getDeptId() == null : this.getDeptId().equals(other.getDeptId()))
            && (this.getOrganType() == null ? other.getOrganType() == null : this.getOrganType().equals(other.getOrganType()))
            && (this.getAddressCode() == null ? other.getAddressCode() == null : this.getAddressCode().equals(other.getAddressCode()))
            && (this.getPerIds() == null ? other.getPerIds() == null : this.getPerIds().equals(other.getPerIds()))
            && (this.getManagementArea() == null ? other.getManagementArea() == null : this.getManagementArea().equals(other.getManagementArea()))
            && (this.getPerKeys() == null ? other.getPerKeys() == null : this.getPerKeys().equals(other.getPerKeys()))
            && (this.getPort() == null ? other.getPort() == null : this.getPort().equals(other.getPort()))
            && (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getIp() == null) ? 0 : getIp().hashCode());
        result = prime * result + ((getTerminal() == null) ? 0 : getTerminal().hashCode());
        result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getCreateDate() == null) ? 0 : getCreateDate().hashCode());
        result = prime * result + ((getUpdateDate() == null) ? 0 : getUpdateDate().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getToken() == null) ? 0 : getToken().hashCode());
        result = prime * result + ((getBrowser() == null) ? 0 : getBrowser().hashCode());
        result = prime * result + ((getSystemName() == null) ? 0 : getSystemName().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getOrganId() == null) ? 0 : getOrganId().hashCode());
        result = prime * result + ((getDeptId() == null) ? 0 : getDeptId().hashCode());
        result = prime * result + ((getOrganType() == null) ? 0 : getOrganType().hashCode());
        result = prime * result + ((getAddressCode() == null) ? 0 : getAddressCode().hashCode());
        result = prime * result + ((getPerIds() == null) ? 0 : getPerIds().hashCode());
        result = prime * result + ((getManagementArea() == null) ? 0 : getManagementArea().hashCode());
        result = prime * result + ((getPerKeys() == null) ? 0 : getPerKeys().hashCode());
        result = prime * result + ((getPort() == null) ? 0 : getPort().hashCode());
        result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", ip=").append(ip);
        sb.append(", terminal=").append(terminal);
        sb.append(", version=").append(version);
        sb.append(", userId=").append(userId);
        sb.append(", userName=").append(userName);
        sb.append(", createDate=").append(createDate);
        sb.append(", updateDate=").append(updateDate);
        sb.append(", state=").append(state);
        sb.append(", token=").append(token);
        sb.append(", browser=").append(browser);
        sb.append(", systemName=").append(systemName);
        sb.append(", address=").append(address);
        sb.append(", organId=").append(organId);
        sb.append(", deptId=").append(deptId);
        sb.append(", organType=").append(organType);
        sb.append(", addressCode=").append(addressCode);
        sb.append(", perIds=").append(perIds);
        sb.append(", managementArea=").append(managementArea);
        sb.append(", perKeys=").append(perKeys);
        sb.append(", port=").append(port);
        sb.append(", customerId=").append(customerId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}